package com.qf.wangqing.sportsnews.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.qf.wangqing.sportsnews.fragment.sliding.HotFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/12/15.
 */

public class FragmentCompetitionAdapter extends FragmentPagerAdapter{
    private List<String> list;


    public FragmentCompetitionAdapter(FragmentManager fm) {
        super(fm);
        list = new ArrayList<>();
        list.add(0,"热帖");
        list.add(1,"社区");
    }

    @Override
    public Fragment getItem(int position) {
        return new HotFragment();
    }

    @Override
    public int getCount() {

        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return list.get(position);
    }
}
